load("//rs/tests:common.bzl", "UNIVERSAL_VM_RUNTIME_DEPS")
load("//rs/tests:system_tests.bzl", "system_test_nns")

package(default_visibility = ["//rs:system-tests-pkg"])

system_test_nns(
    name = "rosetta_test",
    env = {
        "ROSETTA_CLI_PATH": "$(rootpath //:rosetta-cli)",
    },
    tags = [
        "colocate",
        "long_test",  # the P90 duration was over 7 minutes in the week starting on 2025-08-21
    ],
    runtime_deps = [
        "//:rosetta-cli",
        "//rs/rosetta-api/icp:ic-rosetta-api",
        "//rs/tests:rosetta_workspace",
    ],
    deps = [
        "//rs/canister_client",
        "//rs/ledger_suite/icp:icp_ledger",
        "//rs/nns/constants",
        "//rs/nns/governance/api",
        "//rs/nns/test_utils",
        "//rs/registry/subnet_type",
        "//rs/rosetta-api/icp/ledger_canister_blocks_synchronizer/test_utils",
        "//rs/rosetta-api/icp/test_utils",
        "//rs/rust_canisters/canister_test",
        "//rs/rust_canisters/dfn_protobuf",
        "//rs/test_utilities/identity",
        "//rs/tests/driver:ic-system-test-driver",
        "//rs/types/types",
        "@crate_index//:anyhow",
        "@crate_index//:lazy_static",
        "@crate_index//:slog",
        "@crate_index//:url",
    ],
)

system_test_nns(
    name = "rosetta_neuron_follow_test",
    env = {
        "ROSETTA_CLI_PATH": "$(rootpath //:rosetta-cli)",
    },
    tags = [
        "long_test",  # since it takes longer than 5 minutes.
    ],
    runtime_deps =
        UNIVERSAL_VM_RUNTIME_DEPS + [
            "//:rosetta-cli",
            "//rs/rosetta-api/icp:ic-rosetta-api",
            "//rs/rosetta-api/icp:rosetta_image.tar",
            "//rs/tests:rosetta_workspace",
        ],
    deps = [
        "//rs/ledger_suite/common/ledger_core",
        "//rs/nns/common",
        "//rs/nns/governance/api",
        "//rs/rosetta-api/icp:rosetta-api",
        "//rs/rosetta-api/icp/test_utils",
        "//rs/tests/driver:ic-system-test-driver",
        "//rs/tests/financial_integrations/rosetta/rosetta_test_lib",
        "@crate_index//:anyhow",
        "@crate_index//:assert-json-diff",
        "@crate_index//:rand",
        "@crate_index//:serde_json",
    ],
)
